
import React, { Component,Text } from "react";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";

import Toast from "./toast/toast.js";
import Nickname from "./toast/nickname/nickname.js";

import "./App.css";
import logo from "./images/logo.png";
import main from "./images/main.jpg";

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      nickname_active: true,
      status: 1
    };

    this.handleChildChange = this.handleChildChange.bind(this);
  }

  handleChildChange(newState) {
    if (newState) {
      this.setState(newState);
    }
  }

  render() {
    console.log(this.props.history)


    return (
      <div className="home-wrap">
        {/* <Test test2={this.props}/> */}
         <Toast onChange={this.handleChildChange}  test2={this.props}/>
        <Nickname nickname_active={this.state.nickname_active} test2={this.props}/>
        <div className="home">
          <div className="logo-wrap">
            <img src={logo} className="logo" />
          </div>
          <div className="main">
            <img src={main} className="main-background" />
          </div>
        </div>
      </div>     
    );
  }
}

export default App;
